package com.me.chat.service.chat;

import com.me.chat.pojo.chat.ChatLately;
import com.me.chat.pojo.chat.qo.ChatLatelyQO;
import com.me.chat.pojo.chat.qo.ChatMessageQO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 最近联系人
 * @Authhor: qiu
 * @Date: 2021/11/23 8:30 下午
 */

public interface ChatLateService {

    /**
     * 查出最近联系人
     * @return
     */
    List<ChatLately> selChatLately();

    /**
     * 最近联系人入库 从消息内容中获取 一对一的情况
     * @param chatMessageQO
     */
    void addChatLately(ChatMessageQO chatMessageQO);

    /**
     * 删除最近联系人
     * @param chatLatelyQO
     */
    void delChatLately(ChatLatelyQO chatLatelyQO);

    /**
     * 更新最近联系人
     * @param chatLatelyQO
     */
    void upChatLately(ChatLatelyQO chatLatelyQO);

    /**
     * 往redis中设置当前用户当前的聊天室，并且未阅读量清空
     * @param chatLatelyQO
     */
    void setRoomFlag(ChatLatelyQO chatLatelyQO);

    /**
     * 未阅读量清空
     * @param chatLatelyQO
     */
    void noReadClear(ChatLatelyQO chatLatelyQO);

    /**
     * 当前用户当前的聊天室清空
     * @param chatLatelyQO
     */
    void removeRoomFlag(ChatLatelyQO chatLatelyQO);

    /**
     *
     */
}
